package com.lb.bs.client.processor.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * program: LB-BS-Client
 * author: bsworld.xie
 * create: 2019-12-19 11:56
 * description:
 */
public enum KeyType {

    ITEM_KEY(1, "普通key"),

    GRAY_IP_KEY(2, "灰度IP key"),

    GRAY_ITEM_KEY(3, "灰度item key");


    KeyType(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    private static Map<Integer, KeyType> lookUpMap = new HashMap<>();

    static {
        EnumSet<KeyType> processorTypes = EnumSet.allOf(KeyType.class);
        for (KeyType keyType : processorTypes) {
            lookUpMap.put(keyType.getCode(), keyType);
        }
    }


    private Integer code;
    private String msg;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}
